<?php

Route::group([
    'prefix' => 'goods',
    'middleware' =>'auth.admin',
], function () {
    Route::get('list', [
        'as' => 'AdminGoodsList',
        'alias' => '产品列表',
        'uses' => 'Admin\GoodsController@showList'
    ]);

    Route::get('edit', [
        'as' => 'AdminGoodsEdit',
        'alias' => '产品添加',
        'uses' => 'Admin\GoodsController@showEdit'
    ]);

    Route::post('edit', [
        'as' => 'AdminGoodsEditAction',
        'alias' => '产品添加保存',
        'uses' => 'Admin\GoodsController@saveEdit'
    ]);

    Route::post('delete-picture', [
        'as' => 'AdminGoodsDeletePicture',
        'alias' => '产品图片删除',
        'uses' => 'Admin\GoodsController@deletePicture'
    ]);

    Route::post('delete', [
        'as' => 'AdminGoodsDelete',
        'alias' => '产品删除',
        'uses' => 'Admin\GoodsController@delete'
    ]);

    Route::get('evaluate-list', [
        'as' => 'AdminGoodsEvaluateList',
        'alias' => '产品评价列表',
        'uses' => 'Admin\GoodsController@showEvaluateList'
    ]);

    Route::get('evaluate-edit', [
        'as' => 'AdminGoodsEvaluateEdit',
        'alias' => '产品评价编辑',
        'uses' => 'Admin\GoodsController@showEvaluateEdit'
    ]);

    Route::post('evaluate-edit', [
        'as' => 'AdminGoodsEvaluateEditAction',
        'alias' => '产品评价编辑保存',
        'uses' => 'Admin\GoodsController@saveEvaluateEdit'
    ]);

    Route::post('evaluate-delete', [
        'as' => 'AdminGoodsEvaluateDelete',
        'alias' => '产品评价删除',
        'uses' => 'Admin\GoodsController@evaDelete'
    ]);

    Route::get('buys-list', [
        'as' => 'AdminGoodsBuysList',
        'alias' => '产品购买记录列表',
        'uses' => 'Admin\GoodsController@showBuysList'
    ]);

    Route::get('buys-edit', [
        'as' => 'AdminGoodsBuysEdit',
        'alias' => '产品购买记录编辑',
        'uses' => 'Admin\GoodsController@showBuysEdit'
    ]);

    Route::post('buys-edit', [
        'as' => 'AdminGoodsBuysEditAction',
        'alias' => '产品购买记录编辑保存',
        'uses' => 'Admin\GoodsController@saveBuysEdit'
    ]);

    Route::post('buys-delete', [
        'as' => 'AdminGoodsBuysDelete',
        'alias' => '产品购买记录删除',
        'uses' => 'Admin\GoodsController@delBuys'
    ]);

});